#!/bin/bash

# 创建一个临时文件来存储SQL指令
temp_sql_file=$(mktemp)

# 将指令写入临时文件
cat <<EOF > $temp_sql_file
create table warehouse (w_id int, name char(8));
insert into warehouse values (534, 'asdfhjkl');
update warehouse set w_id=500 where w_id=534;
select * from warehouse;
update warehouse set w_id=w_id+5 where w_id=500;
select * from warehouse;
EOF

# 启动rmdb并将指令传入
./build/rmdb_client  < $temp_sql_file
rm $temp_sql_file
